package com.spring.Controller.Interface;

import com.spring.Entity.ContractEntity;
import jxl.read.biff.BiffException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.text.ParseException;
import java.util.Date;
import java.util.Map;

/**
 * Created by Arabira on 2016/8/4.
 */
public interface ContractController {
    public Map<String, Object> addContract(ContractEntity contractEntity, HttpSession session,
                                           HttpServletRequest request);

    public Map<String, Object> addContractExcel(MultipartFile file, HttpServletRequest request) throws IOException, BiffException, ParseException;

    public Map<String, Object> updateContract(ContractEntity contractEntity, HttpSession session,
                                              HttpServletRequest request);

    public Map<String, Object> upOrDown(String contractId, HttpSession session, HttpServletRequest request);

    public Map<String, Object> findContractByUserName(HttpSession session, Integer pageNum, Integer pageSize,
                                                      HttpServletRequest request);

    public Map<String, Object> findContractById(String contractId, HttpSession session, HttpServletRequest request);

//    public Map<String, Object> findContractAll(HttpSession session, Integer pageNum, Integer pageSize,
//                                                      HttpServletRequest request);

    public Map<String, Object> findContractAll(HttpSession session, HttpServletRequest request);
    public Map<String, Object> deleteContractByAdmin(String contractId, HttpSession session, HttpServletRequest request);
    public Map<String, Object> searchReqByAdmin(String contractId, String contractName, String userName, String start, String deadline, HttpSession session, HttpServletRequest request);
    public Map<String, Object> addContractByAdmin(ContractEntity contractEntity, HttpSession session, HttpServletRequest request);
    public Map<String, Object> addContractByExcel(MultipartFile file, HttpServletRequest request) throws IOException, BiffException, ParseException;
}
